const subtitleParser = require("../index");
const contentSRT = 
`
1
00:00:01,410 --> 00:00:04,220
我们已经走得太远，以至于忘记了为什么出发。
We already walked too far, down to we had forgotten why embarked.
2
00:00:04,251 --> 00:00:06,234
天下没有不散的筵席
There is no never-ending feast
`;
const contentLRC = 
`
[ar:A lot]
[ti:Something just like this]
[al:Memories... Do Not Open]
[by:RotCool]
[offset:-3000]
[00:05:50]I've been reading books of old
[00:10:50][00:30:51]I want to something just like this
`;
console.log(subtitleParser().parse(contentSRT, "SRT"));
console.log(JSON.stringify(subtitleParser().parse(contentLRC, "LRC")));

let subtitleSRT = new subtitleParser(contentSRT);
let subtitleLRC = new subtitleParser(contentLRC);
console.log(subtitleSRT.getNowSubtitle(5));
console.log("demarcation line");
console.log(subtitleLRC.getNowSubtitle(12));